﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.TeamFoundation.Controls;
using Microsoft.VisualStudio.Shell;
using TeamExplorer.Merge.Base;

namespace TeamExplorer.Merge.MergeCandidates
{
    //[TeamExplorerNavigationLink(MergeCandidatesNavigationLink.LinkId, TeamExplorerNavigationItemIds.PendingChanges, 200)]
    //not used for VS2013
    public class MergeCandidatesNavigationLink : TeamExplorerBaseNavigationLink
    {
        public const string LinkId = "B9CAEB89-9067-4730-A38F-51260965D896";

        [ImportingConstructor]
        public MergeCandidatesNavigationLink([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider)
            : base(serviceProvider)
        {
            this.Text = "Merge Candidates";
            this.IsVisible = true;
            this.IsEnabled = true;
        }


        public override void Execute()
        {
            var teamExplorer = GetService<ITeamExplorer>();
            teamExplorer.NavigateToPage(new Guid(MergeCandidatesPage.PageId), null);
        }
    }
}
